<!-- toaster directive -->
<toaster-container toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>
<!-- / toaster directive -->

<!-- 导航条 -->
<div class="bg-white bread-crumb">
    <ul class="breadcrumb b-a m-b-n-xs lter b-b wrapper-md">
        <li><a ui-sref="main.tpl.homePage"><i class="fa fa-home"></i> 首页</a></li>
        <li class="active" ng-bind="title"></li>
    </ul>
</div>

<!-- 加载提醒 -->
<div ng-show="loading" class="text-center m-t-md text-lg"><i class="fa fa-spin fa-spinner"></i> 数据加载中...</div>

<!-- 内容区域 -->
<div ng-hide="loading" class="wrapper-md content">
    <!-- 数据显示 -->
    <div class="wrapper-data">
        <div class="panel panel-default">
            <!-- 头部 -->
            <div class="panel-body">
                <!--<div class="w-lg">-->
                <form ng-submit="search()" class="form-horizontal">
                    <div class="form-group">
                        <div class="col-sm-2">
                            <input type="text" class="form-control" ng-model="param.creativeName"
                                   placeholder="创意名称">
                        </div>

                        <div class="col-sm-2">
                            <input type="text" class="form-control" ng-model="param.planId"
                                   placeholder="计划id">
                        </div>

                        <div class="col-sm-2">
                            <select class="form-control" ng-model="param.creativeType" TITLE="创意分类">
                                <option value="">--全部分类--</option>
                                <option value="1">pc静态创意</option>
                                <option value="2">pc视频创意</option>
                                <option value="3">PC信息流创意</option>
                                <option value="4">移动静态创意</option>
                                <option value="5">移动视频创意</option>
                                <option value="6">移动信息流创意</option>
                            </select>
                        </div>

                        <div class="col-sm-2">
                            <select class="form-control" ng-model="param.status">
                                <option value="">--初审状态--</option>
                                <option value="2">待审核</option>
                                <option value="3">审核通过</option>
                                <option value="4">审核失败</option>
                                <option value="5">取消</option>
                                <option value="6">暂停</option>
                                <option value="7">作废</option>
                            </select>
                        </div>

                        <div class="col-sm-2">
                            <select class="form-control" ng-model="param.zzyStatus">
                                <option value="">--智子云审核状态--</option>
                                <option value="0">未提交</option>
                                <option value="1">审核中</option>
                                <option value="2">审核通过</option>
                                <option value="3">审核失败</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-1">
                            <label class="col-sm-1 control-label"><button class="ifc-btn btn-primary" ng-click="search(1)" type="submit">查 询</button></label>
                        </div>
                        <div class="col-md-1">
                            <label class="col-sm-1 control-label"><button class="ifc-btn btn-dark" ng-click="clearSearch()" type="reset">清 空</button></label>
                        </div>

                        <div class="col-md-1">
                            <label class="col-sm-1 control-label"><button type="button" class="ifc-btn btn-success" ng-click="batchApprove(3)" >批量通过</button></label>
                        </div>
                        <div class="col-md-1">
                            <label class="col-sm-1 control-label"><button type="button" class="ifc-btn btn-danger"  ng-click="batchApprove(4)" >批量失败</button></label>
                        </div>
                    </div>
                </form>
                <!--</div>-->
            </div>

            <!-- 数据表格 -->
            <div class="table-responsive">
                <table class="table table-striped b-t b-light text-center">
                    <thead>
                    <tr>
                        <th><input type="checkbox" ng-click="selectAll($event)"/>全选</th>
                        <th>计划ID</th>
                        <th>创意名称</th>
                        <th>创意分类</th>
                        <th>标题</th>
                        <th>初审状态</th>
                        <th>智子云审核状态</th>
                        <th>智子云审核内容</th>
                        <th>申请时间</th>
                        <th>审核更新时间</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr ng-repeat="item in pageInfo.records">
                        <td class="v-middle">
                            <input type="checkbox" name="selected" ng-checked="isSelected(item.id)" ng-click="updateSelection($event,item)"/>
                        </td>
                        <td class="v-middle">{{item.planId}}</td>
                        <td class="v-middle">{{item.creativeName}}</td>
                        <td class="v-middle">
                            <span ng-if="item.creativeType=='1'">pc静态创意</span>
                            <span ng-if="item.creativeType=='2'">PC视频创意</span>
                            <span ng-if="item.creativeType=='3'">PC信息流创意</span>
                            <span ng-if="item.creativeType=='4'">移动静态创意</span>
                            <span ng-if="item.creativeType=='5'">移动视频创意</span>
                        </td>
                        <td class="v-middle">{{item.title}}</td>
                        <td class="v-middle">
                            <span ng-if="item.status=='1'" class="text-danger">未提交</span>
                            <span ng-if="item.status=='2'" class="text-danger">待审核</span>
                            <span ng-if="item.status=='3'" class="text-success">审核通过</span>
                            <span ng-if="item.status=='4'" class="text-success">审核失败</span>
                            <span ng-if="item.status=='5'">取消</span>
                            <span ng-if="item.status=='6'">暂停</span>
                            <span ng-if="item.status=='7'">作废</span>
                        </td>
                        <td class="v-middle"><button class="btn btn-success" ng-if="item.status=='3'" ng-click="selectmodal(item)">查看</button></td>
                        <td class="v-middle">{{item.zzyVerifyMessage}}</td>
                        <td class="v-middle">{{item.createTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
                        <td class="v-middle">{{item.updateTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
                        <td class="v-middle">
                            <a ui-sref="main.zzy.creative.detail({id: item.id})" class="btn btn-sm btn-default">
                                <i class="fa fa-edit m-r-xs text-sm"></i>详情</a>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div><!-- /.table-responsive -->
            <form id="saveReason">
                <div class="modal fade bs-example-modal-lg" tabindex="-1" data-backdrop="static" id="refuseDiv" role="dialog"
                     aria-labelledby="gridSystemModalLabelSupply">
                    <div class="modal-dialog modal-lg" role="document">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                        aria-hidden="true">&times;</span></button>
                                <h4 class="modal-title" id="gridSystemModalLabelSupply"><span id="title"></span>审核</h4>
                            </div>
                            <div class="modal-body">
                                <p></p>
                                <div class="row">
                                    <label class="col-sm-2 control-label text-right">拒绝原因:</label>
                                    <div class="col-sm-4">
                                        <input type="text" class="form-control" name="approveReason" maxlength="60"
                                               placeholder="请输入拒绝原因" ng-model="param.approveReason">
                                    </div>
                                </div>
                                <p></p>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                                <button type="button" class="btn btn-primary" ng-click="saveApproveReason()">确定</button>
                            </div>
                        </div><!-- /.modal-content -->
                    </div><!-- /.modal-dialog -->
                </div><!-- /.modal -->
            </form>

            <div class="cover" ng-show="selectPlatform" >
                <div class="firstApplyWrap1" style="overflow-y:scroll">
                    <div class="clear"><i style="float: right; margin-top: 5px; margin-right: 5px; cursor: pointer; color:#ccc; font-size: 30px;" class=" iconfont closeBtn noselect" ng-click="selectPlatform=false">&#xe608;</i></div>
                    <div class="title" >
                        <div class="modal-header">
                            <h4 class="modal-title" id="CashLabel">平台审核</h4>
                        </div>
                        <div class="modal-body">

                            <!-- 数据表格 -->
                            <div class="table-responsive">
                                <table class="table table-striped b-t b-light text-center">
                                    <thead>
                                    <tr>
                                        <th>平台名称</th>
                                        <th>渠道</th>
                                        <th>审核状态</th>
                                        <th>审核说明</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr ng-repeat="item in platforms">
                                        <td class="v-middle" title="{{item.platformName}}">{{item.platformName | limitTo:10}}</td>
                                        <td class="v-middle">
                                            <span>智子云</span>
                                        </td>
                                        <td class="v-middle">
                                            <span ng-if="item.state==0" class="text-danger">未提交</span>
                                            <span ng-if="item.state==1" style="color: #00E8D7">审核中</span>
                                            <span ng-if="item.state==2" class="text-success">审核通过</span>
                                            <span ng-if="item.state==3" style="color: #564aa3">审核失败</span>
                                        </td>
                                        <td class="v-middle" title="{{item.verifyMessage}}">{{item.verifyMessage | limitTo:10}}</td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div><!-- /.table-responsive -->

                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default" ng-click="selectPlatform=false" data-dismiss="modal">取消</button>
                            <!--<button type="button" class="btn btn-primary" ng-click="approve(record.id,2)">确定</button>-->
                        </div>
                    </div>
                </div>
            </div>
            <!-- 底部分页 -->
            <span data-ng-include=" 'src/tpl/pageInfo.html' "></span>
        </div><!-- /.panel -->
    </div><!-- /.wrapper-data -->

</div><!-- /.wrapper-md -->



<style>
    .cover {
        position: fixed;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 2000;
        top: 0;
        left: 0;
        /* display: none; */
    }

    .firstApplyWrap{
        width: 550px;
        height:280px;
        background: #fff;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%,-50%);
        -webkit-transform: translate(-50%,-50%);
        -ms-transform: translate(-50%,-50%);
        -o-transform: translate(-50%,-50%);
        -moz-transform: translate(-50%,-50%);
        border-radius: 5px;
        overflow: hidden;
    }
    .firstApplyWrap1{
        width: 950px;
        height:680px;
        background: #fff;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%,-50%);
        -webkit-transform: translate(-50%,-50%);
        -ms-transform: translate(-50%,-50%);
        -o-transform: translate(-50%,-50%);
        -moz-transform: translate(-50%,-50%);
        border-radius: 5px;
        overflow: hidden;
    }
    .firstApplyWrap .title{
        font-size: 18px;
        color:#333;
        padding:18px 36px 0 36px;
        text-align: center;
        line-height: 2em;
    }
    .firstApplyWrap .closeBtn,.finishData .closeBtn{
        font-size: 30px;
        padding:5px 10px 0 0;
        border-radius: 50%;
        color: #ccc;
        float: right;
        cursor: pointer;
    }
    .finishData .closeBtn{
        position: absolute;
        top:10px;
        right:10px;
    }
    .firstApplyWrap .bkgIcon{
        position: absolute;
        left: 54px;
        top:87px;
        font-size: 50px;
        color:#FFB136;
    }
    .firstApplyWrap .applyBtnWrap{
        position: absolute;
        bottom: -2px;
        width: 100%;
    }
    .firstApplyWrap .applyBtn{
        width: 50%;
        height:70px;
        line-height: 70px;
        background: #FFB135;
        font-size: 20px;
        text-align: center;
        color:#fff;
        cursor: pointer;
        float:left;
    }
    .firstApplyWrap .applyBtn:last-child{
        background: #5796FC;
    }





</style>